/*************************************
Copyright 2011 Chinua Iloabachie, Pradnya Khutafale, Siyi Liu, Junichi Suzuki, and The University of Massachusetts, Boston (http://code.google.com/p/tabletuml/)


Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 
*************************************/


package touchMe.Util;
import touchMe.Draw.StartUPScreen;
import touchMe.Draw.TouchMe;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;


public class Deselector extends Activity implements Runnable 
{
  int millis=0;
  View view = null;
  Context context;
  Class invokeClass;

public Deselector(int millis,  View view,Context context,Class classInvoke)
{
    this.millis = millis;
    this.view = view ;
    this.context=context;
    this.invokeClass=classInvoke;
}

@Override
public void run() {
    // TODO Auto-generated method stub
    try {
        Thread.sleep(millis);
        //view.setSelected(false);
        //view.invalidate();
       //Class myclass=(new TouchMe()).getClass();
        Intent intent = new Intent(context,invokeClass);
        //intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK);
        intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
		startActivity(intent);
    } catch (InterruptedException e) 
    {
       }
  }//end run
}

